FILE(GLOB SRC *.cpp)
FILE(GLOB HEADER *.h)

INCLUDE_DIRECTORIES(${SQUISH_INCLUDE_DIR})

NL_TARGET_LIB(s3tc_compressor ${SRC} ${HEADER})

TARGET_LINK_LIBRARIES(s3tc_compressor ${SQUISH_LIBRARIES} nelmisc nel3d)
NL_DEFAULT_PROPS(s3tc_compressor "NeL, Tools, 3D: S3TC Compressor Library")
NL_ADD_RUNTIME_FLAGS(s3tc_compressor)

ADD_DEFINITIONS(${SQUISH_DEFINITIONS})

IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
  INSTALL(TARGETS s3tc_compressor LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
ENDIF()
